/**
 * 
 */
package com.xbang.core.struts.support;

import java.util.Map;

import org.apache.struts2.interceptor.SessionAware;

import com.xbang.attendance.entity.system.Menu;

/**
 * @author dev.zhang
 */
public class MenuActionSupport extends BaseActionSupport implements SessionAware {

	private static final long serialVersionUID = 5392691498011894109L;

	@SuppressWarnings("unchecked")
	private Map sessionMap;

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.opensymphony.xwork2.ActionSupport#execute()
	 */
	@Override
	public String execute() throws Exception {
		Menu submenu = (Menu) sessionMap.get("submenu");
		return "r:/" + submenu.getUrl();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.apache.struts2.interceptor.SessionAware#setSession(java.util.Map)
	 */
	@SuppressWarnings("unchecked")
	public void setSession(Map sessionMap) {
		this.sessionMap = sessionMap;
	}
}
